/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-07-19
 * Time: 10:14
 */
class MyArray{
    public Object[] arr = new Object[10];

    public Object getArray(int pos){
        return arr[pos];
    }
    public void setArr(int pos ,Object val){
        this.arr[pos] = val;
    }
}
public class Test {
    public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.setArr(0,18);
        myArray.setArr(1,"hello");
        String s = (String) myArray.getArray(1);
        int a = (int)myArray.getArray(0);
        System.out.println(s);
        System.out.println(a);
    }

}
